package com.project.module.utill;

import com.alibaba.fastjson.JSON;

import java.util.List;

public class Obj2ListUtil {

    public static <T> List<T> getListFobj(Object object, Class<T> clazz) {

        try {
            if (object == null || object.toString().trim().length() == 0) {
                return null;
            }
            String string = JSON.toJSONString(object);
            return JSON.parseArray(string, clazz);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }




    }


}
